<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="css/common.css" type="text/css" />

<link href="css/adminstyle.css" rel="stylesheet" type="text/css">

<link href="js/uploadify/uploadify.css" rel="stylesheet" type="text/css">
<title><?=Common::_t('page_admin_area')?></title>
<script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<link href="css/ui-lightness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery-ui-1.10.3.custom.js"></script>
<script language="javascript" type="text/javascript" src="js/uploadify/swfobject.js"></script>
<script language="javascript" type="text/javascript" src="js/uploadify/jquery.uploadify.v2.1.4.min.js"></script>

</head>

<script>

$(function() {		

	$( "#tabs" ).tabs();

});

</script>

<body>
<div id="man_zone">
 <?$page_th = Common::_t('page_th');?>
 <?$page_message = Common::_t('page_message');?>
<div id="tabs" style="border:0; padding:0; background:none;">

	<ul style="width:98%; margin:0 auto;">

		<li><a href="#tabs-1">	<?=getStr($page_th, 'teacher_info')?></a></li>

		<li><a href="#tabs-2">	<?=getStr($page_th, 'other_info')?></a></li>

		<li><a href="#tabs-3">	<?=getStr($page_th, 'introduce_info')?></a></li>

		<li><a href="#tabs-4">	<?=getStr($page_th, 'resume_info')?></a></li>

</ul>
<div style="background-color:#FFFFFF ">

 <form  method="post" action="<? if  (empty($id)){ echo  'teacher_subAdd.html'; }else{ echo  'teacher_subUpdate.html'; }  ?>" ><input name="id" type="hidden" value="<?=$id?>">

<div id="tabs-1" style="padding:0;">

  <table width="98%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">

    <tr>

      <td  class="left_title_2adminssd" width="10%"><?=getStr($page_th, 'name')?></td>

      <td  width="40%" bgcolor="#FFFFFF"><input name="name" type="text"  value="<?=getStr($extract_vars,'name')?>"></td>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'english_level')?></td>

      <td  bgcolor="#FFFFFF"><select name="english_level">
			<?=$teacherLevelOption?>
      </select></td>

      </tr>

       <tr>

          <td class="left_title_2adminssd"><?=getStr($page_th, 'teacher_no')?></td>

          <td  bgcolor="#FFFFFF">

        	<input name="serial_number" type="text" value="<?=getStr($extract_vars,'serial_number')?>" readonly/>

          </td>

 <td class="left_title_2adminssd"><?=getStr($page_th, 'sex')?></td>

      <td  bgcolor="#FFFFFF">

      <select name="sex">
   	   <?=$sexOption?>
      </select>

      </td>          

      </tr>

    <tr>

          <td class="left_title_2adminssd"><?=getStr($page_th, 'status')?></td>

          <td bgcolor="#FFFFFF"><select name="status" >
          	<?=$statusOption?>
          </select></td>

          <td class="left_title_2adminssd"><?=getStr($page_th, 'tel')?></td>

          <td  bgcolor="#FFFFFF"><input type="text" name="phone" id="textfield" value="<?=getStr($extract_vars,'phone')?>" /></td>

      </tr>

        <tr>

          <td class="left_title_2adminssd"><?=getStr($page_th, 'student_level')?></td>

          <td  bgcolor="#FFFFFF">

          <select name="teach_level">

	 		<?=$teachLevelOption?>

     	 </select>

      </td>

	      <td  class="left_title_2adminssd"><?=getStr($page_th, 'follower')?></td>

	      <td  bgcolor="#FFFFFF"><select name="employees_id" >

	      <?

	      foreach ($employees as $v){

		  ?>

	        <option value="<?=$v['id']?>" <? if (getStr($extract_vars,'employees_id')==$v['id']){ echo 'selected="selected"'; } ?>  ><?=$v['name']?></option>

	        <?

		  }

			?>

	      </select></td>          

      </tr>

     

   <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'address')?></td>

      <td  bgcolor="#FFFFFF"><input name="address" type="text"  value="<?=getStr($extract_vars,'address')?>" size="60" /></td>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'email')?></td>

      <td  bgcolor="#FFFFFF"><input name="email" type="text"  value="<?=getStr($extract_vars,'email')?>" /></td>

      </tr>

      

      <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'age')?></td>

      <td  bgcolor="#FFFFFF"><input name="age" type="text"  value="<?=getStr($extract_vars,'age')?>" /></td>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'teach_experience')?></td>

      <td  bgcolor="#FFFFFF"><input name="experience" type="text" value="<?=getStr($extract_vars,'experience')?>" />月</td>

      </tr>

      

      <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'skype')?></td>

      <td  bgcolor="#FFFFFF"><input name="skype" type="text"  value="<?=getStr($extract_vars,'skype')?>" /></td>      

      <td class="left_title_2adminssd"><?=getStr($page_th, 'skype_status')?></td>

      <td  bgcolor="#FFFFFF"><select name="skype_status" >

        <?=$skypeStatusOption?>

      </select></td>

      </tr>

      <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'qq')?></td>

      <td  bgcolor="#FFFFFF"><input name="qq" type="text"  value="<?=getStr($extract_vars,'qq')?>" /></td>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'qq_status')?></td>

      <td  bgcolor="#FFFFFF"><select name="qq_status" >

        <?=$qqStatusOption?>

      </select></td>

      </tr>

	  <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'teach_experience_foruser')?></td>

      <td  bgcolor="#FFFFFF"><select name="education_experience" >

        <?=$educationExperienceOption?>

      </select></td>	

      <td class="left_title_2adminssd"><?=getStr($page_th, 'public_praise_foruser')?></td>

      <td colspan="3" bgcolor="#FFFFFF"><input name="word_mouth" type="text" value="<?=getStr($extract_vars,'word_mouth')?>" /></td>	        

      </tr>
      <?if($_SESSION['admin']['group']['code']=='MAIN_TEACHER_MANAGER_CH'||$_SESSION['admin']['group']['code']=='ADMIN'||$_SESSION['admin']['group']['code']=='LOCAL_TACHER_MANAGER_CH'){?>      
	  	<tr>
      	<td class="left_title_2adminssd"><?=getStr($page_th, 'real_education_experience')?></td>
      	<td  bgcolor="#FFFFFF"><select name="real_education_experience" >
        	<?=$realEducationExperienceOption?>
      	</select>(不要随意改动，系统将会自动更新等级)</td>	
      	<td class="left_title_2adminssd">基本分数(刚加入系统时的等级分数)</td>
      	<td colspan="3" bgcolor="#FFFFFF"><input type="text" name="base_integral" value="<?=$base_integral?>"></td>	        
      </tr>      
	  <?}?>
   		<tr>
      <td class="left_title_2adminssd"><?=getStr($page_th, 'pxh')?></td>
      
      <td  bgcolor="#FFFFFF"><input name="pxh" type="text"  value="<?=getStr($extract_vars,'pxh')?>" /></td>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'network_stat')?></td>

      <td  bgcolor="#FFFFFF">
      <select name="network_stat" >
        <?=$networkStatOption?>
      </select>
      </td>

      </tr>

	  <tr>	  
  </table>

</div>	



<div id="tabs-2"  style="padding:0;">

<table width="98%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">

   <tr>

      <td  class="left_title_2adminssd"><?=getStr($page_th, 'contract_type')?></td>

      <td  bgcolor="#FFFFFF"><select name="contract_category" >
		  <?=$contractCategoryOption?>	
      </select>

     </td>		

      <td class="left_title_2adminssd"><?=getStr($page_th, 'country')?></td>

      <td  bgcolor="#FFFFFF"><select name="nationality" >
		<?=$nationalityOption?>
      </select></td>

      </tr>
<tr>
      <td class="left_title_2adminssd"><?=getStr($page_th, 'teacher_recommend')?></td>
      <td  bgcolor="#FFFFFF">
      <input name="recommend" type="checkbox" <?
      if (getStr($extract_vars,'recommend')   ==TEACHER_RECOMMEND){
	  	echo ' checked="checked"';
	  }
	  ?> value="" />
      </td>
      <td class="left_title_2adminssd"><?=getStr($page_th, 'account')?></td>
      <td  bgcolor="#FFFFFF"><input name="account" type="text"  value="<?=getStr($extract_vars,'account')?>" size="30"/></td>      
      </tr>
       <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'contract_valid_date')?></td>

      <td bgcolor="#FFFFFF">

	   <?=getStr($page_th, 'start_date')?><input type="text" onClick="WdatePicker()" name="job_start_date" id="textfield2" value="<? if (!empty($job_start_date)){ echo date('Y-m-d',$job_start_date);}?>" />
	  <br>   
	   <?=getStr($page_th, 'end_date')?><input type="text" onClick="WdatePicker()" name="job_end_date" id="textfield2" value="<? if (!empty($job_end_date)){ echo date('Y-m-d',$job_end_date);}?>" /></td>

      <td  class="left_title_2adminssd"><?=getStr($page_th, 'hobby')?></td>

      <td  bgcolor="#FFFFFF"><textarea name="hobby" rows="10" cols="50"><?=getStr($extract_vars,'hobby')?></textarea></td>

	  </tr>

        

       <tr>

      <td class="left_title_2adminssd"><?=getStr($page_th, 'goods_at_course')?></td>

      <td colspan="1"  bgcolor="#FFFFFF"><?
		  $i=0;	
	      foreach($course_types as $k=>$v){
		  $i++;
		  ?>
        <input name="good_course[]" type="checkbox" value="<?=$k?>"   
        <? if  (is_array(getStr($extract_vars,'good_course')) && in_array($k,getStr($extract_vars,'good_course'))){ echo 'checked';  } ?> />
        <?=$v?>
        <?
		if($i%4==0){?>
		<br>
		<?}}?>
       </td>      
      <td class="left_title_2adminssd"><?=getStr($page_th, 'teach_style')?></td>
         <td  bgcolor="#FFFFFF"><textarea name="teaching_style" rows="10" cols="50"><?=getStr($extract_vars,'teaching_style')?></textarea></td>

      </tr>      

      

        <tr>

          <td class="left_title_2adminssd"><?=getStr($page_th, 'self_introduce_voice')?></td>

          <td  colspan="3" bgcolor="#FFFFFF">
	      <?php $display_style='none'; $upload_value="";?>
	      <?if(getStr($extract_vars,'introduce')!=""){?>
		  		<?  $display_style='inline-block';?>
		  		<?  $upload_value=htmlspecialchars(getStr($extract_vars,'introduce'));?>
	      <?}?>
	      <input id="file_upload_introduce" id2="24" name="file_upload_introduce" class="file_upload_introduce" type="file" multiple="true">
	      <br>
	      <a href="javaScript:void(0);" class="del_file" style="display:<?=$display_style?>">&nbsp;&nbsp;&nbsp;&nbsp;<?=getStr($page_th, 'del_file')?></a>
	      <a class="file_link" href="../<?=$upload_value?>" target="_blank" style="display:<?=$display_style?>"/><?=getStr($page_th, 'link_url')?></a>
	      <input type="hidden" class="file_src" name="introduce" value="<?=$upload_value?>" id="introduce" >
          </td>
       </tr>    

       <tr style="height:100px;">
          <td class="left_title_2adminssd" ><?=getStr($page_th, 'index_img')?>(122*92)</td>
          <td colspan="3" bgcolor="#FFFFFF">
	      <?php $display_style='none'; $upload_value="";?>
	      <?if(getStr($extract_vars,'portrait')!=""){?>
		  		<?  $display_style='inline-block';?>
		  		<?  $upload_value=htmlspecialchars(getStr($extract_vars,'portrait'));?>
	      <?}?>
	      <input id="file_upload_portait" id2="21"  name="file_upload_portait" class="file_upload" type="file" multiple="true">
	      <br>
	      <a href="javaScript:void(0);" class="del_file" style="display:<?=$display_style?>">&nbsp;&nbsp;&nbsp;&nbsp;<?=getStr($page_th, 'del_file')?></a>
	      <a class="file_link" href="../<?=$upload_value?>" target="_blank" style="display:<?=$display_style?>"/><?=getStr($page_th, 'link_url')?></a>
	      <input type="hidden" class="file_src" name="portrait" value="<?=$upload_value?>" id="portrait" >	          
          </td>
      </tr>     

 

       <tr style="height:100px;">
          <td class="left_title_2adminssd" ><?=getStr($page_th, 'list_img')?>(80*80)</td>
          <td colspan="3" bgcolor="#FFFFFF">
	      <?php $display_style='none'; $upload_value="";?>
	      <?if(getStr($extract_vars,'list_portrait')!=""){?>
		  		<?  $display_style='inline-block';?>
		  		<?  $upload_value=htmlspecialchars(getStr($extract_vars,'list_portrait'));?>
	      <?}?>
	      <input id="file_upload_list_portrait" id2="22" name="file_list_portrait" class="file_upload" type="file" multiple="true">
	      <br>
	      <a href="javaScript:void(0);" class="del_file" style="display:<?=$display_style?>">&nbsp;&nbsp;&nbsp;&nbsp;<?=getStr($page_th, 'del_file')?></a>
	      <a class="file_link" href="../<?=$upload_value?>" target="_blank" style="display:<?=$display_style?>"/><?=getStr($page_th, 'link_url')?></a>
	      <input type="hidden" class="file_src" name="list_portrait" value="<?=$upload_value?>" id="portrait" >	          
          </td>
      </tr>     

 
       <tr style="height:100px;">
          <td class="left_title_2adminssd" ><?=getStr($page_th, 'detail_img')?>(180*232)</td>
          <td colspan="3" bgcolor="#FFFFFF">
	      <?php $display_style='none'; $upload_value="";?>
	      <?if(getStr($extract_vars,'detail_portrait')!=""){?>
		  		<?  $display_style='inline-block';?>
		  		<?  $upload_value=htmlspecialchars(getStr($extract_vars,'detail_portrait'));?>
	      <?}?>
	      <input id="file_upload_detail_portrait" id2="23" name="file_upload_detail_portrait" class="file_upload" type="file" multiple="true">
	      <br>
	      <a href="javaScript:void(0);" class="del_file" style="display:<?=$display_style?>">&nbsp;&nbsp;&nbsp;&nbsp;<?=getStr($page_th, 'del_file')?></a>
	      <a class="file_link" href="../<?=$upload_value?>" target="_blank" style="display:<?=$display_style?>"/><?=getStr($page_th, 'link_url')?></a>
	      <input type="hidden" class="file_src" name="detail_portrait" value="<?=$upload_value?>" id="detail_portrait" >	          
          </td>
      </tr>     

 

 </table>  	

</div>
<script type="text/javascript">
    $(document).ready(function() {
		$(function() {
			$('.file_upload').uploadify({
		        'uploader'  : 'js/uploadify/uploadify.swf',
		        'script'    : 'js/uploadify/uploadify.php',
		        'cancelImg' : 'js/uploadify/cancel.png',
		        'folder'    : 2,
		        'auto'      : true,
		        'fileExt'   : '*.gif;*.jpg;',
		        'fileDesc'  : 'Web Image Files (.GIF,*.JPG)',
		        'sizeLimit' : '2097152',
		        'onComplete'  : function(event, ID, fileObj, response, data) {
		          $("#" + $(event.target).attr("id")).nextAll(".del_file").show();
		          $("#" + $(event.target).attr("id")).nextAll(".file_src").val(response);
		          $("#" + $(event.target).attr("id")).nextAll(".file_link").attr("href","../"+response);
		          $("#" + $(event.target).attr("id")).nextAll(".file_link").show();
		        }		        
			});
			$('.file_upload_introduce').uploadify({
		        'uploader'  : 'js/uploadify/uploadify.swf',
		        'script'    : 'js/uploadify/uploadify.php',
		        'cancelImg' : 'js/uploadify/cancel.png',
		        'folder'    : 2,
		        'auto'      : true,
		        'fileExt'   : '*.mp3;*.wma;',
		        'fileDesc'  : 'Media Files(.MP3,*.WMA)',
		        'sizeLimit' : '8097152',
		        'onComplete'  : function(event, ID, fileObj, response, data) {
		          $("#" + $(event.target).attr("id")).nextAll(".del_file").show();
		          $("#" + $(event.target).attr("id")).nextAll(".file_src").val(response);
		          $("#" + $(event.target).attr("id")).nextAll(".file_link").attr("href","../"+response);
		          $("#" + $(event.target).attr("id")).nextAll(".file_link").show();
		        }		        
			});
		});
    });	
    
    $(".del_file").click(
        function()
        {
          if(confirm('<?=getStr($page_message, 'page_message_3')?>'))
          {
            $(this).hide();
            $(this).nextAll(".file_src").val("");
            $(this).nextAll(".file_link").attr("href","");
            $(this).nextAll(".file_link").hide();
            alert("<?=getStr($page_message, 'page_message_4')?>");
          }
        }
    )
</script>
<div id="tabs-3"  style="padding:0;">

  <table width="98%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">

  <tr>

  <td class="left_title_2adminssd"><?=getStr($page_th, 'self_introduce_zh_cn')?></td>

  <td  bgcolor="#FFFFFF">
  <?=$ueditor_introduce_chinese?>
  </td>

  </tr>

  <tr>

  <td class="left_title_2adminssd"><?=getStr($page_th, 'self_introduce_en_us')?></td>

  <td  bgcolor="#FFFFFF"><?=$ueditor_introduce_english?></td>

  </tr>

      

 </table>  	

</div>

<div id="tabs-4"  style="padding:0;">

  <table width="98%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">

  <tr bgcolor="#FFFFFF">

    <td class="left_title_2adminssd" bgcolor="#FFFFFF"><?=getStr($page_th, 'resume_zh_cn')?></td>

    <td colspan="3">
	<?=$ueditor_resume?>
	</td>

  </tr>

  <tr bgcolor="#FFFFFF">

    <td class="left_title_2adminssd" bgcolor="#FFFFFF"><?=getStr($page_th, 'resume_en_us')?></td>

    <td colspan="3">
    <?=$ueditor_english_resume?></td>

  </tr>

 </table>  	

</div>

<div>

<table cellpadding="0" cellspacing="0" class="tablenoborder" align="center">

    <tr bgcolor="#FFFFFF">

      <td colspan="4" align="center" >

      &nbsp;&nbsp;&nbsp;

    </tr>
    <tr bgcolor="#FFFFFF">

      <td colspan="4" align="center" >

        <input name="" type="button" class="PublicBot" value="<?=Common::_t('page_back')?>" onclick="location.href='teacher_lists.html'" />

        &nbsp;&nbsp;&nbsp;
		<?if($_SESSION['admin']['admin_type']==ADMIN_TYPE_EMPLOYEE){ ?>
        <input class="PublicBot" name="" type="submit" value="<?=Common::_t('page_save')?>" /></td>
		<?}?>
    </tr>

    <tr bgcolor="#FFFFFF">

      <td colspan="4" align="center" >

      &nbsp;&nbsp;&nbsp;

    </tr>

 </table>  

</div>

 </form>

</div>
</div>

</div>

</body>

</html>

